﻿using K9Nano.IM.Security;
using Microsoft.Extensions.DependencyInjection;
using WalkingTec.Mvvm.Mvc;

namespace K9Nano.IM.Controllers
{
    public class K9BaseController : BaseController
    {
        protected virtual void Md5Validate(IAppSignModel model)
        {
            var manager = HttpContext.RequestServices.GetService<IAppSignModelManager>();

            if (!manager.Verify(model))
            {
                ModelState.AddModelError(nameof(model.Sign), "签名无效");
            }
        }
    }
}